MSVC Builds: Fix Build of Introspection Files
authorChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 28 Aug 2013 06:27:02 +0000 (14:27 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 28 Aug 2013 06:27:02 +0000 (14:27 +0800)
We need to copy the GDK .lib/.dll from Release_Broadway\<Platform>\bin
or Debug_Broadway\<Platform>\bin to Release\<Platform>\bin or
Debug\<Platform>\bin respectively during the build of Broadway flavors of
GDK, as the MSVC introspection builds expects the GDK .lib/.dll to be
in Release\<Platform>\bin or Debug\<Platform>\bin.

Use a new property sheet to do so for Broadway builds of GDK-during the
builds of Win32-only GDK, the broadway builds of the GDK .lib/.dll would
be cleared out prior to the build of the Win32-only GDK.

build/win32/vs10/Makefile.am
build/win32/vs10/gdk.vcxprojin
build/win32/vs10/gtk-copy-gdk-broadway.props [new file with mode: 0644]
build/win32/vs9/Makefile.am
build/win32/vs9/gdk.vcprojin
build/win32/vs9/gtk-copy-gdk-broadway.vsprops [new file with mode: 0644]

index 4743b8ecbfd8b4ecb70f39f6fa2cd66222ab4223..44b2883d1b93fb8e6082e7b3fdaf406796669684 100644 (file)
@@ -36,6 +36,7 @@ EXTRA_DIST += \
        gtk-install-headers-data.props  \
        gtk-version-paths.props \
        gtkprebuild-broadway.props      \
-       gtkprebuild.props
+       gtkprebuild.props       \
+       gtk-copy-gdk-broadway.props
 
 -include $(top_srcdir)/git.mk
index 62f48c3260ce50dcab9bbe9b2fb99535e2145cdb..d8d07278bf49201f4970c63562c6c4adb00b4a31 100644 (file)
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     <Import Project="gtk-build-defines.props" />
+    <Import Project="gtk-copy-gdk-broadway.props" />
   </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     <Import Project="gtk-build-defines.props" />
+    <Import Project="gtk-copy-gdk-broadway.props" />
   </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     <Import Project="gtk-build-defines.props" />
+    <Import Project="gtk-copy-gdk-broadway.props" />
   </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     <Import Project="gtk-build-defines.props" />
+    <Import Project="gtk-copy-gdk-broadway.props" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
diff --git a/build/win32/vs10/gtk-copy-gdk-broadway.props b/build/win32/vs10/gtk-copy-gdk-broadway.props
new file mode 100644 (file)
index 0000000..76fc97d
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <_PropertySheetDisplayName>gtkcopygdkbroadwayprops</_PropertySheetDisplayName>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup>\r
+    <PostBuildEvent>\r
+      <Command>\r
+if "$(Configuration)" == "Release" goto END
+\r
+if "$(Configuration)" == "Debug" goto END
+\r
+if "$(Configuration)" == "Release_Broadway" goto DoRelease
+\r
+if "$(Configuration)" == "Debug_Broadway" goto DoDebug
+\r
+\r
+:DoRelease
+\r
+mkdir .\Release\$(Platform)\bin
+\r
+copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
+\r
+copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Release\$(Platform)\bin\
+\r
+goto END
+\r
+\r
+:DoDebug
+\r
+mkdir .\Debug\$(Platform)\bin
+\r
+copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Debug\$(Platform)\bin\
+\r
+copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Debug\$(Platform)\bin\
+\r
+goto END
+\r
+\r
+:END\r
+      </Command>\r
+    </PostBuildEvent>\r
+  </ItemDefinitionGroup>\r
+</Project>
\ No newline at end of file
index 71bf0e5483c27a952da0970394eb660f4bdf8a3d..f56ec64236a7b81425d2948eb8a8f8b472f4d253 100644 (file)
@@ -24,6 +24,7 @@ EXTRA_DIST += \
        gtk-install-headers-data.vsprops        \
        gtk-version-paths.vsprops       \
        gtkprebuild.vsprops     \
-       gtkprebuild-broadway.vsprops
+       gtkprebuild-broadway.vsprops    \
+       gtk-copy-gdk-broadway.vsprops
 
 -include $(top_srcdir)/git.mk
index 26c675f68721878777b8bf2ded6991f9ef6e34fb..aafa97a331b354da8a1d634268b67dd13140cdb9 100644 (file)
@@ -53,7 +53,7 @@
                </Configuration>\r
                <Configuration\r
                        Name="Debug_Broadway|Win32"\r
-                       InheritedPropertySheets=".\gtk-build-defines.vsprops"\r
+                       InheritedPropertySheets=".\gtk-build-defines.vsprops;.\gtk-copy-gdk-broadway.vsprops"\r
                        ConfigurationType="2"\r
                        CharacterSet="2"\r
                        >\r
                </Configuration>\r
                <Configuration\r
                        Name="Release_Broadway|Win32"\r
-                       InheritedPropertySheets=".\gtk-build-defines.vsprops"\r
+                       InheritedPropertySheets=".\gtk-build-defines.vsprops;.\gtk-copy-gdk-broadway.vsprops"\r
                        ConfigurationType="2"\r
                        CharacterSet="2"\r
                        WholeProgramOptimization="1"\r
                </Configuration>\r
                <Configuration\r
                        Name="Debug_Broadway|x64"\r
-                       InheritedPropertySheets=".\gtk-build-defines.vsprops"\r
+                       InheritedPropertySheets=".\gtk-build-defines.vsprops;.\gtk-copy-gdk-broadway.vsprops"\r
                        ConfigurationType="2"\r
                        CharacterSet="2"\r
                        >\r
diff --git a/build/win32/vs9/gtk-copy-gdk-broadway.vsprops b/build/win32/vs9/gtk-copy-gdk-broadway.vsprops
new file mode 100644 (file)
index 0000000..d0dab58
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioPropertySheet\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="gtkcopygdkbroadwayprops"\r
+       >\r
+       <Tool\r
+               Name="VCPostBuildEventTool"\r
+               CommandLine="\r
+if &quot;$(ConfigurationName)&quot; == &quot;Release&quot; goto END&#x0D;&#x0A;\r
+if &quot;$(ConfigurationName)&quot; == &quot;Debug&quot; goto END&#x0D;&#x0A;\r
+if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; goto DoRelease&#x0D;&#x0A;\r
+if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; goto DoDebug&#x0D;&#x0A;\r
+\r
+:DoRelease&#x0D;&#x0A;\r
+mkdir .\Release\$(PlatformName)\bin&#x0D;&#x0A;\r
+copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(PlatformName)\bin\&#x0D;&#x0A;\r
+copy /b $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib .\Release\$(PlatformName)\bin\&#x0D;&#x0A;\r
+goto END&#x0D;&#x0A;\r
+\r
+:DoDebug&#x0D;&#x0A;\r
+mkdir .\Debug\$(PlatformName)\bin&#x0D;&#x0A;\r
+copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Debug\$(PlatformName)\bin\&#x0D;&#x0A;\r
+copy /b $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib .\Debug\$(PlatformName)\bin\&#x0D;&#x0A;\r
+goto END&#x0D;&#x0A;\r
+\r
+:END&#x0D;&#x0A;\r
+"\r
+       />\r
+</VisualStudioPropertySheet>
\ No newline at end of file